//Instructions: Create a function that takes a string, checks if it has the same number of 'x's and 'o's and returns either true or false.

public class Program 
{
    public static bool XO(string str) 
    {
      int xCount = 0;
      int oCount = 0;
      foreach(char c in str)
      {
        if (c=='x' || c=='X'){xCount += 1;}
        if (c=='o' || c=='O'){oCount += 1;}
      }
      return (xCount == oCount) ? true : false;
    }
}
